<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        div {
            height: 100%;
            width: 100%;
        }
        
        .kuang {
            width: 70%;
            height: 7vw;
            border: none;
            border-radius: 5px;
            background-color: #f5f5ff;
            margin: 2vw 5vw 5vw 0vw;
        }
        
        .add {
            width: 15%;
            height: 7vw;
            color: cyan;
            font-size: 5vw;
        }
        
        .rwlb {
            display: inline-block;
            width: 28%;
            margin-right: 1.3333vw;
            background-color: aqua;
            border-radius: 1vw;
            text-align: center;
            color: white;
        }
        
        .p1 {
            width: 90%;
            font-size: 5vw;
            font-weight: bold;
            margin: 1.0667vw .6667vw;
        }
        
        .myli {
            /* width: 100%; */
            width: 90%;
            height: 5vw;
            background-color: red;
            color: white;
            padding: 1.3333vw 1.3333vw;
        }
        
        .delete {
            float: right;
        }
        
        .tishi {
            text-align: center;
            /* display: none; */
        }
        
        .zheng {
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div id="app">
        <div>
            <input type="text" class="kuang" v-model="myvalue" placeholder="请输入任务名称">
            <span class="add" @click="myadd()">添加</span>
        </div>
        <div>
            <span class="rwlb">全部任务 {{list.length}}</span><span class="rwlb">以完成任务 {{list.length-unFinishCount}}</span><span class="rwlb">未完成任务 {{unFinishCount}}</span>
        </div>
        <div>
            <p class="p1">任务列表</p>
        </div>

        <div class="myli" v-for="(item,index) in list" :class="item.zhtai==true?'zheng':''">
            <input type="checkbox" @click="gaibian(item)"><span>{{index+1}}.{{  item.name}}</span> <span class="delete" @click="mydelete(index)">删除</span>
        </div>
        <div class="tishi" v-show="list.length == 0">
            <p>任务列表空空如也，快去添加任务吧！</p>
        </div>
    </div>
</body>

</html>
<script src="../vue-2.5.21.js"></script>
<script src="1.任务处理今日作业.js"></script>